package manong.beans;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;

public class Arrange implements Cloneable, Serializable {
 
    private Integer id;
    private Integer courseId;
    private Integer classId;
    private Integer roomId;
    private Integer techerId;
    private Integer semeId;
    private String courseName;
    private String className;
    private String roomName;
    private String techerName;
    private Integer starWeek;
    private Integer endWeek;
    private Integer srd;
    private Integer statu;
    private String mark;
    
    
    private static final long serialVersionUID = 1L;
    //声明了一个名为serialVersionUID的私有静态最终常量字段。此字段的目的是为该类对象的序列化和反序列化提供版本号。
    //  通过显式地将serialVersionUID字段设置为特定值（在本例中为1L），表明您知道序列化和版本控制，并且为此类提供了固定的版本标识符。
    
    
    public Arrange(Integer id, Integer courseId, Integer classId, Integer roomId, Integer techerId, Integer semeId, String courseName, String className, String roomName, String techerName, Integer starWeek, Integer endWeek, Integer srd, Integer statu, String mark) {
        this.id = id;
        this.courseId = courseId;
        this.classId = classId;
        this.roomId = roomId;
        this.techerId = techerId;
        this.semeId = semeId;
        this.courseName = courseName;
        this.className = className;
        this.roomName = roomName;
        this.techerName = techerName;
        this.starWeek = starWeek;
        this.endWeek = endWeek;
        this.srd = srd;
        this.statu = statu;
        this.mark = mark;
    }

 //数据表排列
    public Arrange() {
        super();
    }

 
    public Integer getId() {
        return id;
    }

   
    public Arrange withId(Integer id) {
        this.setId(id);
        return this;
    }


    public void setId(Integer id) {
        this.id = id;
    }


    public Integer getCourseId() {
        return courseId;
    }

 
    public Arrange withCourseId(Integer courseId) {
        this.setCourseId(courseId);
        return this;
    }


    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }


    public Integer getClassId() {
        return classId;
    }


    public Arrange withClassId(Integer classId) {
        this.setClassId(classId);
        return this;
    }


    public void setClassId(Integer classId) {
        this.classId = classId;
    }

   
    public Integer getRoomId() {
        return roomId;
    }

 
    public Arrange withRoomId(Integer roomId) {
        this.setRoomId(roomId);
        return this;
    }

  
    public void setRoomId(Integer roomId) {
        this.roomId = roomId;
    }

   
  
    public Integer getTecherId() {
        return techerId;
    }


    public Arrange withTecherId(Integer techerId) {
        this.setTecherId(techerId);
        return this;
    }

   
    public void setTecherId(Integer techerId) {
        this.techerId = techerId;
    }

  
    public Integer getSemeId() {
        return semeId;
    }

  
    public Arrange withSemeId(Integer semeId) {
        this.setSemeId(semeId);
        return this;
    }


    public void setSemeId(Integer semeId) {
        this.semeId = semeId;
    }


    public String getCourseName() {
        return courseName;
    }

   
    public Arrange withCourseName(String courseName) {
        this.setCourseName(courseName);
        return this;
    }

  
    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

   
    public String getClassName() {
        return className;
    }

   
    public Arrange withClassName(String className) {
        this.setClassName(className);
        return this;
    }

 
    public void setClassName(String className) {
        this.className = className;
    }


    public String getRoomName() {
        return roomName;
    }

  
    public Arrange withRoomName(String roomName) {
        this.setRoomName(roomName);
        return this;
    }

  
    public void setRoomName(String roomName) {
        this.roomName = roomName;
    }

 
    public String getTecherName() {
        return techerName;
    }

 
    public Arrange withTecherName(String techerName) {
        this.setTecherName(techerName);
        return this;
    }

 
    public void setTecherName(String techerName) {
        this.techerName = techerName;
    }

  
    public Integer getStarWeek() {
        return starWeek;
    }

 
    public Arrange withStarWeek(Integer starWeek) {
        this.setStarWeek(starWeek);
        return this;
    }


    public void setStarWeek(Integer starWeek) {
        this.starWeek = starWeek;
    }

    
    public Integer getEndWeek() {
        return endWeek;
    }

    
    public Arrange withEndWeek(Integer endWeek) {
        this.setEndWeek(endWeek);
        return this;
    }

   
    public void setEndWeek(Integer endWeek) {
        this.endWeek = endWeek;
    }

 
    public Integer getSrd() {
        return srd;
    }

  
    public Arrange withSrd(Integer srd) {
        this.setSrd(srd);
        return this;
    }

    
    public void setSrd(Integer srd) {
        this.srd = srd;
    }

  
    public Integer getStatu() {
        return statu;
    }

    public Arrange withStatu(Integer statu) {
        this.setStatu(statu);
        return this;
    }

  
    public void setStatu(Integer statu) {
        this.statu = statu;
    }

   
    public String getMark() {
        return mark;
    }

  
    public Arrange withMark(String mark) {
        this.setMark(mark);
        return this;
    }

  
    public void setMark(String mark) {
        this.mark = mark;
    }

  
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Arrange other = (Arrange) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCourseId() == null ? other.getCourseId() == null : this.getCourseId().equals(other.getCourseId()))
            && (this.getClassId() == null ? other.getClassId() == null : this.getClassId().equals(other.getClassId()))
            && (this.getRoomId() == null ? other.getRoomId() == null : this.getRoomId().equals(other.getRoomId()))
            && (this.getTecherId() == null ? other.getTecherId() == null : this.getTecherId().equals(other.getTecherId()))
            && (this.getSemeId() == null ? other.getSemeId() == null : this.getSemeId().equals(other.getSemeId()))
            && (this.getCourseName() == null ? other.getCourseName() == null : this.getCourseName().equals(other.getCourseName()))
            && (this.getClassName() == null ? other.getClassName() == null : this.getClassName().equals(other.getClassName()))
            && (this.getRoomName() == null ? other.getRoomName() == null : this.getRoomName().equals(other.getRoomName()))
            && (this.getTecherName() == null ? other.getTecherName() == null : this.getTecherName().equals(other.getTecherName()))
            && (this.getStarWeek() == null ? other.getStarWeek() == null : this.getStarWeek().equals(other.getStarWeek()))
            && (this.getEndWeek() == null ? other.getEndWeek() == null : this.getEndWeek().equals(other.getEndWeek()))
            && (this.getSrd() == null ? other.getSrd() == null : this.getSrd().equals(other.getSrd()))
            && (this.getStatu() == null ? other.getStatu() == null : this.getStatu().equals(other.getStatu()))
            && (this.getMark() == null ? other.getMark() == null : this.getMark().equals(other.getMark()));
    }

  
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCourseId() == null) ? 0 : getCourseId().hashCode());
        result = prime * result + ((getClassId() == null) ? 0 : getClassId().hashCode());
        result = prime * result + ((getRoomId() == null) ? 0 : getRoomId().hashCode());
        result = prime * result + ((getTecherId() == null) ? 0 : getTecherId().hashCode());
        result = prime * result + ((getSemeId() == null) ? 0 : getSemeId().hashCode());
        result = prime * result + ((getCourseName() == null) ? 0 : getCourseName().hashCode());
        result = prime * result + ((getClassName() == null) ? 0 : getClassName().hashCode());
        result = prime * result + ((getRoomName() == null) ? 0 : getRoomName().hashCode());
        result = prime * result + ((getTecherName() == null) ? 0 : getTecherName().hashCode());
        result = prime * result + ((getStarWeek() == null) ? 0 : getStarWeek().hashCode());
        result = prime * result + ((getEndWeek() == null) ? 0 : getEndWeek().hashCode());
        result = prime * result + ((getSrd() == null) ? 0 : getSrd().hashCode());
        result = prime * result + ((getStatu() == null) ? 0 : getStatu().hashCode());
        result = prime * result + ((getMark() == null) ? 0 : getMark().hashCode());
        return result;
    }

   
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", courseId=").append(courseId);
        sb.append(", classId=").append(classId);
        sb.append(", roomId=").append(roomId);
        sb.append(", techerId=").append(techerId);
        sb.append(", semeId=").append(semeId);
        sb.append(", courseName=").append(courseName);
        sb.append(", className=").append(className);
        sb.append(", roomName=").append(roomName);
        sb.append(", techerName=").append(techerName);
        sb.append(", starWeek=").append(starWeek);
        sb.append(", endWeek=").append(endWeek);
        sb.append(", srd=").append(srd);
        sb.append(", statu=").append(statu);
        sb.append(", mark=").append(mark);
        sb.append("]");
        return sb.toString();
    }

   
    @Override
    public Arrange clone() throws CloneNotSupportedException {
        return (Arrange) super.clone();
    }


    public enum Column {
        id("id", "id", "INTEGER", false),
        courseId("course_id", "courseId", "INTEGER", false),
        classId("class_id", "classId", "INTEGER", false),
        roomId("room_id", "roomId", "INTEGER", false),
        techerId("techer_id", "techerId", "INTEGER", false),
        semeId("seme_id", "semeId", "INTEGER", false),
        courseName("course_name", "courseName", "VARCHAR", false),
        className("class_name", "className", "VARCHAR", false),
        roomName("room_name", "roomName", "VARCHAR", false),
        techerName("techer_name", "techerName", "VARCHAR", false),
        starWeek("star_week", "starWeek", "INTEGER", false),
        endWeek("end_week", "endWeek", "INTEGER", false),
        srd("srd", "srd", "INTEGER", false),
        statu("statu", "statu", "INTEGER", false),
        mark("mark", "mark", "VARCHAR", false);

      
        private static final String BEGINNING_DELIMITER = "`";

      
        private static final String ENDING_DELIMITER = "`";

      
        private final String column;

       
        private final boolean isColumnNameDelimited;

       
        private final String javaProperty;

       
        private final String jdbcType;

        
        public String value() {
            return this.column;
        }

        
        public String getValue() {
            return this.column;
        }

      
        public String getJavaProperty() {
            return this.javaProperty;
        }

    
        public String getJdbcType() {
            return this.jdbcType;
        }

      
        Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
            this.column = column;
            this.javaProperty = javaProperty;
            this.jdbcType = jdbcType;
            this.isColumnNameDelimited = isColumnNameDelimited;
        }

      
        public String desc() {
            return this.getEscapedColumnName() + " DESC";
        }

    
        public String asc() {
            return this.getEscapedColumnName() + " ASC";
        }

  
        public static Column[] excludes(Column ... excludes) {
            ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
            if (excludes != null && excludes.length > 0) {
                columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
            }
            return columns.toArray(new Column[]{});
        }

       
        public String getEscapedColumnName() {
            if (this.isColumnNameDelimited) {
                return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
            } else {
                return this.column;
            }
        }
    }
}